package cn.blackhole.simple.domain.retry.service;

import java.time.temporal.ChronoUnit;

public interface RetryPolicy {

    int maxAttempts();

    long delayMillis(int attempt);

    boolean shouldRetry(Throwable... exception);

    default ChronoUnit getChronoUnit(){
        return ChronoUnit.MILLIS;
    }
}
